import { defineStore } from 'pinia'
import { postExplainDetailRequest } from '@/service/module/explain/explaindetail'

interface Iexplaindetaildemo {
  iid: number
  title: string

  image: string
  content: string
  connectInformation: string
}

export const useExplainDetailStore = defineStore('explaindetail', {
  state: () => ({
    explaindetaildemo: [] as Iexplaindetaildemo[],
  }),

  getters: {
    // GET_TRAIN() {
    //     this.getTrainList()
    // }
  },
  actions: {
    async explainDetailResultAction() {
      //实验  getAdminRequest

      const res = await postExplainDetailRequest()
      console.log(res, '11111')

      this.explaindetaildemo = res.data.data.findExplainDetailData
    },
  },
  persist: true,
})
